﻿
using System;
using System.Collections.Generic;

namespace LxCFD
{
    public class FvZone : FvZoneBase
    {
        public PhysicalModel PhysicalModel;
        public void SetPhysicalModel(PhysicalModel physicalModel)
        {
            this.PhysicalModel = physicalModel;
            foreach (var t in BoundThreads)
            {
                t.CheckSetBoundarys();
            }
        }
        public ValueBase<double> EnergySource { get => _EnergySource; set { _EnergySource = value; } }
        private ValueBase<double> _EnergySource = new Value1Const.Double(0);
        public ZoneCFDFields CFDFields { get => _CFDFields; set => _CFDFields = value; }
        private ZoneCFDFields _CFDFields;
    }
}
//public override int GetThreadCount()
//{
//    return BoundThreads.Count;
//}
//public override FvThreadBase GetThread(int threadID)
//{
//    return BoundThreads[threadID];
//}
//public void AddBiCGSupport(BiCGStabSolverInZone solver)
//{
//    BiCGSolver.CreateArray(cells.Length);
//}
//public List<int> cellfaces { get; set; }
//public List<int> cellRelated { get; set; }
//public int ownerCellCount { get; set; }
//innerCellCount + boundCellCount
//创建cell中的face信息
//int cellcount = TotalIndex.CellIDs.End + 1;// BoundThreads[BoundThreads.Count - 1].ThreadIndex.EndCellIndex + 1;

//tempCells[i1].cellfaces = new List<int>();
//tempCells[i1].cellRelated = new List<int>();
//tempCells[i1].CellFacesAsO = new List<int>();
//tempCells[i1].CellFacesAsN = new List<int>();
////计算面的几何信息
///                //for (int i2 = 0; i2 < faces.Length; i2++)
//{
//    faces[i2].calBasicGeometry(_nodes);
//}
//计算体的几何信息
//for (int i5 = 0; i5 < cells.Length; i5++)//遍历zone中的cell
//{
//    cells[i5].calBasicGeometry(faces);
//}
//遍历face，把两侧的cell建立连接
//int i6 = 0;
//for (; i6 <= InnerIndex.FaceIDs.End; i6++)//innerCellCount
//{
//    faces[i6].calGeometry_inner(cells);
//}
//for (; i6 < faces.Length; i6++)
//{
//    faces[i6].calGeometry_bound(cells);
//}

//for (int i7 = 0; i7 < cells.Length; i7++)
//{
//    cells[i7].calMatrix_LeastSquare(faces);
//}
//public void splidZoneIndex(int segNum)
//{
//    InnerIndex.Split(segNum);
//    TotalIndex.Split(segNum);
//    foreach (var t in BoundThreads)
//    {
//        t.ThreadIndex.Split(segNum);
//    }
//    AMGSolver.splitAMGIndex(segNum);
//}